<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <title>登录</title>
    <script type="text/javascript">
        function e(length) {
            var s = ""
            var f = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', 'X', 'C', 'V', 'B', 'N', 'M')
            for (var i = 0; i < length; i++) {
                var c = Math.floor(Math.random() * f.length)
                s += f[c]
            }
            return s
        }
        function yan(){
            var e1 = e(4);
            document.getElementById("yanzhengma").value = e1;
        }

    </script>
</head>
<body onload="yan()">
<form action="/denglu" method="post">
    <h3>欢迎光临，请登入</h3>
    <p>账号：<input type="text" name="username"></p>
    <p>密码：<input type="password" name="password"></p>
    <p>验证码：<input type="text" name="yan"><input type="text" name="yanzheng" id="yanzhengma" value="" readonly="readonly" style="width: 50px"></p>
    <input type="submit" value="登录" name="denglu">&nbsp;
    ${errorMsg}
</form>
</body>
</html>